Skip to content

fix: improve condition handling and event emission for failed steps#607

Merged
jumski merged 1 commit intomainfrom
02-06-cover_more_edge_cases
Mar 17, 2026
Merged

fix: improve condition handling and event emission for failed steps#607
jumski merged 1 commit intomainfrom
02-06-cover_more_edge_cases

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Feb 6, 2026

Improved Condition Handling and Task Failure Management

This PR enhances the condition handling and task failure management in PGFlow with several key improvements:

  1. Added default values for condition handling modes:

    • whenUnmet defaults to 'skip'
    • whenExhausted defaults to 'fail'
  2. Improved failure handling for unmet conditions:

    • Added realtime event broadcasting for step and run failures
    • Implemented automatic archiving of queued messages when a run fails due to unmet conditions
  3. Enhanced task failure handling:

    • Made task failure handling more robust and idempotent for replayed failures
    • Fixed the order of operations in skip-cascade scenarios to ensure proper propagation
    • Added proper handling of taskless map steps after dependency skips
  4. Added comprehensive test coverage:

    • Tests for condition evaluation failure events
    • Tests for message archiving on failure
    • Tests for idempotent task failure handling
    • Tests for proper downstream step activation after skips

These changes improve the reliability and observability of workflow execution, particularly in failure scenarios.

@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2026

⚠️ No Changeset found

Latest commit: 5ac520e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@nx-cloud
Copy link

nx-cloud bot commented Feb 6, 2026

View your CI Pipeline Execution ↗ for commit 5ac520e

Command Status Duration Result
nx test:types:health dsl ✅ Succeeded 12s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-17 19:33:57 UTC

@jumski jumski force-pushed the 02-06-cover_more_edge_cases branch 2 times, most recently from 0852217 to 9db59ea Compare February 13, 2026 16:08
@jumski jumski force-pushed the 02-06-cover_more_edge_cases branch from 9db59ea to a347e8c Compare February 13, 2026 19:46
@github-actions
Copy link
Contributor

🔍 Preview Deployment: Website

Deployment successful!

🔗 Preview URL: https://pr-607.pgflow.pages.dev

📝 Details:

  • Branch: 02-06-cover_more_edge_cases
  • Commit: 6b334a9496f8fb8d5897475221b37a0e930f0cd7
  • View Logs

_Last updated: _

Copy link
Contributor Author

jumski commented Mar 17, 2026

Merge activity

  • Mar 17, 7:20 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 17, 7:33 PM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 17, 7:33 PM UTC: @jumski merged this pull request with Graphite.

@jumski jumski changed the base branch from 02-06-fix_fixed_decrements_for_remaining_deps to graphite-base/607 March 17, 2026 19:30
@jumski jumski changed the base branch from graphite-base/607 to main March 17, 2026 19:31
@jumski jumski force-pushed the 02-06-cover_more_edge_cases branch from a347e8c to 5ac520e Compare March 17, 2026 19:32
@jumski jumski merged commit 7ae95e9 into main Mar 17, 2026
13 checks passed
@github-actions
Copy link
Contributor

🚀 Production Deployment: Website

Successfully deployed to production!

🔗 Production URL: https://pgflow.dev

📝 Details:

  • Commit: 7ae95e9564e5009c76dd9db8afd60996f0dae92e
  • View Logs

Deployed at: 2026-03-17T20:33:31+01:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant